3.1.60 \(\int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx\) [60]

3.1.60.1 Optimal result
3.1.60.2 Mathematica [B] (verified)
3.1.60.3 Rubi [A] (verified)
3.1.60.4 Maple [A] (verified)
3.1.60.5 Fricas [A] (verification not implemented)
3.1.60.6 Sympy [F]
3.1.60.7 Maxima [A] (verification not implemented)
3.1.60.8 Giac [A] (verification not implemented)
3.1.60.9 Mupad [B] (verification not implemented)

3.1.60.1 Optimal result

Integrand size = 21, antiderivative size = 81 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {2 \text {arctanh}(\sin (c+d x))}{a^2 d}+\frac {10 \tan (c+d x)}{3 a^2 d}-\frac {2 \tan (c+d x)}{a^2 d (1+\cos (c+d x))}-\frac {\tan (c+d x)}{3 d (a+a \cos (c+d x))^2} \]

output
-2*arctanh(sin(d*x+c))/a^2/d+10/3*tan(d*x+c)/a^2/d-2*tan(d*x+c)/a^2/d/(1+c 
os(d*x+c))-1/3*tan(d*x+c)/d/(a+a*cos(d*x+c))^2
 
3.1.60.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(239\) vs. \(2(81)=162\).

Time = 1.07 (sec) , antiderivative size = 239, normalized size of antiderivative = 2.95 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {2 \cos \left (\frac {1}{2} (c+d x)\right ) \left (\sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+14 \cos ^2\left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {c}{2}\right ) \sin \left (\frac {d x}{2}\right )+6 \cos ^3\left (\frac {1}{2} (c+d x)\right ) \left (2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right )-2 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )+\frac {\sin (d x)}{\left (\cos \left (\frac {c}{2}\right )-\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )-\sin \left (\frac {1}{2} (c+d x)\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}\right )+\cos \left (\frac {1}{2} (c+d x)\right ) \tan \left (\frac {c}{2}\right )\right )}{3 a^2 d (1+\cos (c+d x))^2} \]

input
Integrate[Sec[c + d*x]^2/(a + a*Cos[c + d*x])^2,x]
 
output
(2*Cos[(c + d*x)/2]*(Sec[c/2]*Sin[(d*x)/2] + 14*Cos[(c + d*x)/2]^2*Sec[c/2 
]*Sin[(d*x)/2] + 6*Cos[(c + d*x)/2]^3*(2*Log[Cos[(c + d*x)/2] - Sin[(c + d 
*x)/2]] - 2*Log[Cos[(c + d*x)/2] + Sin[(c + d*x)/2]] + Sin[d*x]/((Cos[c/2] 
 - Sin[c/2])*(Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] - Sin[(c + d*x)/2])*( 
Cos[(c + d*x)/2] + Sin[(c + d*x)/2]))) + Cos[(c + d*x)/2]*Tan[c/2]))/(3*a^ 
2*d*(1 + Cos[c + d*x])^2)
 
3.1.60.3 Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.10, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.524, Rules used = {3042, 3245, 27, 3042, 3457, 3042, 3227, 3042, 4254, 24, 4257}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\sec ^2(c+d x)}{(a \cos (c+d x)+a)^2} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a \sin \left (c+d x+\frac {\pi }{2}\right )+a\right )^2}dx\)

\(\Big \downarrow \) 3245

\(\displaystyle \frac {\int \frac {2 (2 a-a \cos (c+d x)) \sec ^2(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {2 \int \frac {(2 a-a \cos (c+d x)) \sec ^2(c+d x)}{\cos (c+d x) a+a}dx}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \int \frac {2 a-a \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (\sin \left (c+d x+\frac {\pi }{2}\right ) a+a\right )}dx}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 3457

\(\displaystyle \frac {2 \left (\frac {\int \left (5 a^2-3 a^2 \cos (c+d x)\right ) \sec ^2(c+d x)dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\frac {\int \frac {5 a^2-3 a^2 \sin \left (c+d x+\frac {\pi }{2}\right )}{\sin \left (c+d x+\frac {\pi }{2}\right )^2}dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 3227

\(\displaystyle \frac {2 \left (\frac {5 a^2 \int \sec ^2(c+d x)dx-3 a^2 \int \sec (c+d x)dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {2 \left (\frac {5 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx-3 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {2 \left (\frac {-\frac {5 a^2 \int 1d(-\tan (c+d x))}{d}-3 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {2 \left (\frac {\frac {5 a^2 \tan (c+d x)}{d}-3 a^2 \int \csc \left (c+d x+\frac {\pi }{2}\right )dx}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

\(\Big \downarrow \) 4257

\(\displaystyle \frac {2 \left (\frac {\frac {5 a^2 \tan (c+d x)}{d}-\frac {3 a^2 \text {arctanh}(\sin (c+d x))}{d}}{a^2}-\frac {3 \tan (c+d x)}{d (\cos (c+d x)+1)}\right )}{3 a^2}-\frac {\tan (c+d x)}{3 d (a \cos (c+d x)+a)^2}\)

input
Int[Sec[c + d*x]^2/(a + a*Cos[c + d*x])^2,x]
 
output
-1/3*Tan[c + d*x]/(d*(a + a*Cos[c + d*x])^2) + (2*((-3*Tan[c + d*x])/(d*(1 
 + Cos[c + d*x])) + ((-3*a^2*ArcTanh[Sin[c + d*x]])/d + (5*a^2*Tan[c + d*x 
])/d)/a^2))/(3*a^2)
 

3.1.60.3.1 Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3227
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x 
_)]), x_Symbol] :> Simp[c   Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b   Int 
[(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
 

rule 3245
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)])^(n_), x_Symbol] :> Simp[b^2*Cos[e + f*x]*(a + b*Sin[e + f*x])^ 
m*((c + d*Sin[e + f*x])^(n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/( 
a*(2*m + 1)*(b*c - a*d))   Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + 
f*x])^n*Simp[b*c*(m + 1) - a*d*(2*m + n + 2) + b*d*(m + n + 2)*Sin[e + f*x] 
, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && EqQ 
[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] &&  !GtQ[n, 0] && (Intege 
rsQ[2*m, 2*n] || (IntegerQ[m] && EqQ[c, 0]))
 

rule 3457
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + 
(f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim 
p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( 
n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) 
  Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b 
*d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 
2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ 
[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] 
 &&  !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 

rule 4257
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] 
 /; FreeQ[{c, d}, x]
 
3.1.60.4 Maple [A] (verified)

Time = 0.84 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.14

method result size
derivativedivides \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d \,a^{2}}\) \(92\)
default \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}+5 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {2}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}+4 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d \,a^{2}}\) \(92\)
parallelrisch \(\frac {6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \cos \left (d x +c \right )-6 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \cos \left (d x +c \right )+7 \left (\sec ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (\cos \left (d x +c \right )+\frac {5 \cos \left (2 d x +2 c \right )}{14}+\frac {4}{7}\right )}{3 a^{2} d \cos \left (d x +c \right )}\) \(99\)
norman \(\frac {-\frac {9 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}+\frac {7 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}+\frac {\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )}{6 d a}}{\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a}+\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{a^{2} d}-\frac {2 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{d \,a^{2}}\) \(117\)
risch \(\frac {4 i \left (3 \,{\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{3 i \left (d x +c \right )}+11 \,{\mathrm e}^{2 i \left (d x +c \right )}+12 \,{\mathrm e}^{i \left (d x +c \right )}+5\right )}{3 d \,a^{2} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}+\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{a^{2} d}-\frac {2 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d \,a^{2}}\) \(125\)

input
int(sec(d*x+c)^2/(a+cos(d*x+c)*a)^2,x,method=_RETURNVERBOSE)
 
output
1/2/d/a^2*(1/3*tan(1/2*d*x+1/2*c)^3+5*tan(1/2*d*x+1/2*c)-2/(tan(1/2*d*x+1/ 
2*c)+1)-4*ln(tan(1/2*d*x+1/2*c)+1)-2/(tan(1/2*d*x+1/2*c)-1)+4*ln(tan(1/2*d 
*x+1/2*c)-1))
 
3.1.60.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.80 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {3 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left (\cos \left (d x + c\right )^{3} + 2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - {\left (10 \, \cos \left (d x + c\right )^{2} + 14 \, \cos \left (d x + c\right ) + 3\right )} \sin \left (d x + c\right )}{3 \, {\left (a^{2} d \cos \left (d x + c\right )^{3} + 2 \, a^{2} d \cos \left (d x + c\right )^{2} + a^{2} d \cos \left (d x + c\right )\right )}} \]

input
integrate(sec(d*x+c)^2/(a+a*cos(d*x+c))^2,x, algorithm="fricas")
 
output
-1/3*(3*(cos(d*x + c)^3 + 2*cos(d*x + c)^2 + cos(d*x + c))*log(sin(d*x + c 
) + 1) - 3*(cos(d*x + c)^3 + 2*cos(d*x + c)^2 + cos(d*x + c))*log(-sin(d*x 
 + c) + 1) - (10*cos(d*x + c)^2 + 14*cos(d*x + c) + 3)*sin(d*x + c))/(a^2* 
d*cos(d*x + c)^3 + 2*a^2*d*cos(d*x + c)^2 + a^2*d*cos(d*x + c))
 
3.1.60.6 Sympy [F]

\[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\int \frac {\sec ^{2}{\left (c + d x \right )}}{\cos ^{2}{\left (c + d x \right )} + 2 \cos {\left (c + d x \right )} + 1}\, dx}{a^{2}} \]

input
integrate(sec(d*x+c)**2/(a+a*cos(d*x+c))**2,x)
 
output
Integral(sec(c + d*x)**2/(cos(c + d*x)**2 + 2*cos(c + d*x) + 1), x)/a**2
 
3.1.60.7 Maxima [A] (verification not implemented)

Time = 0.25 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.79 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {\frac {\frac {15 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{2}} - \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{2}} + \frac {12 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{2}} + \frac {12 \, \sin \left (d x + c\right )}{{\left (a^{2} - \frac {a^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}}}{6 \, d} \]

input
integrate(sec(d*x+c)^2/(a+a*cos(d*x+c))^2,x, algorithm="maxima")
 
output
1/6*((15*sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^3/(cos(d*x + c) + 
1)^3)/a^2 - 12*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a^2 + 12*log(sin(d 
*x + c)/(cos(d*x + c) + 1) - 1)/a^2 + 12*sin(d*x + c)/((a^2 - a^2*sin(d*x 
+ c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)))/d
 
3.1.60.8 Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 106, normalized size of antiderivative = 1.31 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=-\frac {\frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a^{2}} - \frac {12 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a^{2}} + \frac {12 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )} a^{2}} - \frac {a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 15 \, a^{4} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{6}}}{6 \, d} \]

input
integrate(sec(d*x+c)^2/(a+a*cos(d*x+c))^2,x, algorithm="giac")
 
output
-1/6*(12*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a^2 - 12*log(abs(tan(1/2*d*x + 
 1/2*c) - 1))/a^2 + 12*tan(1/2*d*x + 1/2*c)/((tan(1/2*d*x + 1/2*c)^2 - 1)* 
a^2) - (a^4*tan(1/2*d*x + 1/2*c)^3 + 15*a^4*tan(1/2*d*x + 1/2*c))/a^6)/d
 
3.1.60.9 Mupad [B] (verification not implemented)

Time = 14.37 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.14 \[ \int \frac {\sec ^2(c+d x)}{(a+a \cos (c+d x))^2} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{6\,a^2\,d}-\frac {4\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{a^2\,d}-\frac {2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-a^2\right )}+\frac {5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,a^2\,d} \]

input
int(1/(cos(c + d*x)^2*(a + a*cos(c + d*x))^2),x)
 
output
tan(c/2 + (d*x)/2)^3/(6*a^2*d) - (4*atanh(tan(c/2 + (d*x)/2)))/(a^2*d) - ( 
2*tan(c/2 + (d*x)/2))/(d*(a^2*tan(c/2 + (d*x)/2)^2 - a^2)) + (5*tan(c/2 + 
(d*x)/2))/(2*a^2*d)